<div class="row">
	<div class="col-md-12">
		<!-- Custom Tabs -->
		<div class="nav-tabs-custom">
			<ul class="nav nav-tabs">
				<li>
					<a href="<?php echo base_url();?>jobseekers/welcome"> Welcome</a>
				</li>
				<li >
					<a href="<?php echo base_url();?>jobseekers/resume"> Description</a>
				</li>
				<li class="active">
					<a href="<?php echo $cv==TRUE ? base_url().'jobseekers/modify-resume-creator':base_url().'jobseekers/resume-creator'; ?>"><?php echo $cv==TRUE ?'Modify Resume':'Resume Creator'; ?></a>
				</li>
				<li>
					<a href="<?php echo base_url();?>jobseekers/video-resume">Video Resume</a>
				</li>
				
				<li class="dropdown pull-right">
					<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="glyphicon glyphicon-user"/></i> <?php echo $username;?> <span class="caret"></span> </a>
					<ul class="dropdown-menu">
						<li role="presentation">
							<a role="menuitem" tabindex="-1" href="<?php echo base_url();?>jobseekers/change-picture">Change Picture</a>
						</li>
						<li role="presentation">
							<a role="menuitem" tabindex="-1" href="<?php echo base_url();?>jobseekers/change-password">Change Password</a>
						</li>
						<li role="presentation">
							<a role="menuitem" tabindex="-1" href="<?php echo base_url();?>jobseekers/view-profile">Profile</a>
						</li>
						<li role="presentation" class="divider"></li>
						<li role="presentation">
							<a role="menuitem" tabindex="-1" href="<?php echo base_url();?>jobseekers/logout">Logout</a>
						</li>
					</ul>
				</li>
				
			</ul>
			<div class="box box-primary overried_box_custome">
<div class="box-header overried_box_header">
    <h4 class="box-title overried_box_title">Modify resume creator</h4>
</div>
<?php
    foreach($otherInfo->result() as $otherInfoRow){
        $languageId = $otherInfoRow->native_language_using_language_id;
        $skillResult = $otherInfoRow->skill;
        $interestResult = $otherInfoRow->interesting;
        $referenceResult = $otherInfoRow->reference;
    }
?>
<!-- the events -->
<div id="external-events">
<form role="form" class="form-horizontal remove-box-border" method="post" action="<?php echo base_url();?>jobseekers/modify-resume-creator">
<div class="box-body">
<p><b>Personal Information	</b></p>
<p>You can view or modify your personal information  from <a href="<?php echo base_url();?>jobseekers/edit-profile">Profile->Modify</a> and personal picture from	 <a href="<?php echo base_url();?>jobseekers/change-picture">change personal picture</a> page!</p>
<p><b>Work History</b></p>
<p>Includes full and part-time, temporary, volunteer, military, and internships. Please enter your duties, accomplishments, skills and abilities. You should start with your most recent work experience. and then include up to three past employers.</p>

<div class="box box-primary">
    
    <div class="box-body">
	    <div class="box-header">
	        <h4 class="box_content"><span style="color:#FFF !important;">Education</span></h4>
	    </div>
        <div class="row" id="contain-education">
            <?php
            foreach($education->result() as $educaionRow){
                $resultEducation =  $educaionRow->using_education_level_id;
            ?>
                <div class="toclone">

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="school_name[]">School name <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <input id="textinput" name="school_name[]" placeholder="" value="<?php echo $educaionRow->school_name;  ?>" class="form-control input-md" type="text">
                            <span class="error"><?php echo form_error("school_name"); ?></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="program_name[]">Major <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control input-md" value="<?php echo $educaionRow->program_name;  ?>" placeholder="" name="program_name[]" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="education_level[]">Education level <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <select class="form-control input-md" name="education_level[]">
                                <option value="">-- Education level --</option>
                                <?php foreach($education_level->result() as $row): ?>
                                    <?php if($resultEducation == $row->education_level_id){
                                    ?>
                                        <option selected value="<?php echo $row->education_level_id; ?>"><?php echo $row->name; ?></option>
                                    <?php
                                        }else{
                                    ?>
                                        <option value="<?php echo $row->education_level_id; ?>"><?php echo $row->name; ?></option>
                                    <?php
                                    }
                                    ?>
                                <?php endforeach; ?>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="start_edu_date[]">Start date <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" id="start_edu_date" value="<?php echo $educaionRow->date_attended;  ?>" name="start_edu_date[]" data-inputmask="'alias': 'dd/mm/yyyy'" data-mask  required="required">
                            <span class="error"><?php echo form_error("start_edu_date"); ?></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="end_edu_date[]">End date <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" id="end_edu_date" value="<?php echo date('d/m/Y',strtotime($educaionRow->date_gratuated));  ?>" name="end_edu_date[]"  required="required">
                            <span class="error"><?php echo form_error("end_edu_date"); ?></span>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-xs-11">
                            <span class="pull-right">
	                            <a href="#" class="btn btn-sm btn-danger delete"><i class="glyphicon glyphicon-remove"></i></a>
	                            <a href="#" class="btn btn-sm btn-warning clone"><i class="glyphicon glyphicon-plus"></i></a>
                    		</span>
                        </div>
                    </div>
					
                </div>
            <?php
                }
            ?>
            
        </div>
    </div>
</div>

<div class="box box-primary">
    
    <div class="box-body">
    	<div class="box-header">
        	<h4 class="box_content"><span style="color:#FFF !important;">Working Experiences</span></h4>
    	</div>
        <div class="row" id="contain-exp">
            <?php foreach($history->result() as $historyRow){

             ?>
                <div class="toclone">

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="job_title[]">Job title <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control input-md" value="<?php echo $historyRow->job_title; ?>" placeholder="" name="job_title[]" />
                            <span class="error"><?php echo form_error("job_title"); ?></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="copany_name[]">Company name <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control input-md" value="<?php echo $historyRow->company_name; ?>" placeholder="" name="copany_name[]" />
                            <span class="error"><?php echo form_error("copany_name"); ?></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="employer_name[]">Employer name</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control input-md" placeholder="" value="<?php echo $historyRow->employer_name; ?>" name="employer_name[]" />
                            <span class="error"><?php echo form_error("employer_name"); ?></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="employer_address[]">Employer address</label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control input-md" placeholder="" value="<?php echo $historyRow->employer_address; ?>" name="employer_address[]" />
                            <span class="error"><?php echo form_error("employer_address"); ?></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="job_duty[]">Position <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control input-md" placeholder="" value="<?php echo $historyRow->job_duties; ?>" name="job_duty[]" />
                            <span class="error"><?php echo form_error("job_duty"); ?></span>
                        </div>
                    </div>
<?php
	$exp_start_end=explode('-', $historyRow->start_date_end_date);
	
?>
                    <div class="form-group">
                    	
                        <label class="col-xs-3 control-label" for="start_exp_date[]">Start date <span class="error">*</span></label>
                        <div class="col-xs-8">
                            <input type="text" class="form-control" id="start_exp_date" value="<?php echo $exp_start_end[0]; ?>" name="start_exp_date[]" data-inputmask="'alias': 'dd/mm/yyyy'" data-mask  required="required">
                            <span class="error"><?php echo form_error("start_exp_date"); ?></span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label" for="end_pex_date[]">End date <span class="error">*</span></label>
                        <div class="col-xs-8">
                        	
                            <input type="text" class="form-control" id="end_pex_date" value="<?php echo $exp_start_end[1]; ?>" name="end_pex_date[]" data-inputmask="'alias': 'dd/mm/yyyy'" data-mask  required="required">
                            <span class="error"><?php echo form_error("end_pex_date"); ?></span>
                        </div>
                    </div>

                   <div class="form-group">
                        <div class="col-xs-11">
                            <span class="pull-right">
	                            <a href="#" class="btn btn-sm btn-danger delete"><i class="glyphicon glyphicon-remove"></i></a>
	                            <a href="#" class="btn btn-sm btn-warning clone"><i class="glyphicon glyphicon-plus"></i></a>
                    		</span>
                        </div>
                    </div>

                </div>
            <?php
            }
            ?>
            
        </div>
    </div>
</div>
<div class="box box-primary">
    
    <div class="box-body">
    	<div class="box-header">
        	<h4 class="box_content"><span style="color:#FFF !important;">Languages</span></h4>
    	</div>
        <div class="row">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-xs-3 control-label" for="navtive_language">Native laguage <span class="error">*</span></label>
                    <div class="col-xs-8">
                        <select class="form-control input-md" name="navtive_language">
                            <option value="">-- Navtive language --</option>
                            <?php foreach($laguags->result() as $row): ?>
                                <option <?php echo $languageId == $row->language_id ? "selected" : "";?> value="<?php echo $row->language_id; ?>"><?php echo $row->name; ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <hr />
            </div>
			<div id="contain-language">
            <?php
                foreach($language->result() as $languageRow) {
                    ?>
                        <div class="toclone">

                            <div class="form-group">
                                <label class="col-xs-3 control-label" for="language">Language <span
                                        class="error">*</span></label>

                                <div class="col-xs-8">
                                    <select class="form-control input-md" name="language[]">
                                        <option value="">-- Lanuges --</option>
                                        <?php foreach ($laguags->result() as $row): ?>
                                            <option <?php echo $languageRow->using_language_id == $row->language_id ? "selected":"";  ?>
                                                value="<?php echo $row->language_id; ?>"><?php echo $row->name; ?></option>
                                        <?php endforeach; ?>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-3 control-label" for="level">Level <span
                                        class="error">*</span></label>

                                <div class="col-xs-8">
                                    <select class="form-control input-md" name="level[]">
                                        <option value="">-- Language level --</option>
                                        <?php foreach ($language_level->result() as $row): ?>
                                            <option <?php echo $languageRow->using_proficiency_language_id == $row->proficiency_language_id ? "selected":"";  ?>
                                                value="<?php echo $row->proficiency_language_id; ?>"><?php echo $row->name; ?></option>
                                        <?php endforeach; ?>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
		                        <div class="col-xs-11">
		                            <span class="pull-right">
			                            <a href="#" class="btn btn-sm btn-danger delete"><i class="glyphicon glyphicon-remove"></i></a>
			                            <a href="#" class="btn btn-sm btn-warning clone"><i class="glyphicon glyphicon-plus"></i></a>
		                    		</span>
		                        </div>
		                    </div>

                        </div>
                    
                <?php
                }
            ?>
            </div>
        </div>
    </div>
</div>

<div class="box box-primary">
    
    <div class="box-body">
    	<div class="box-header">
        	<h4 class="box_content"><span style="color:#FFF !important;">Skills</span></h4>
    	</div>
        <div class="row">
            <div class="col-xs-12">
                <textarea class="textarea" name="skill" placeholder="Place some text description here" style="width: 100%; height: 215px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;">
                    <?php echo $skillResult; ?>
                </textarea>
                <span class="error"><?php echo form_error("skill"); ?></span>
            </div>
        </div>
    </div>
</div>

<div class="box box-primary">
    
    <div class="box-body">
    	<div class="box-header">
        	<h4 class="box_content"><span style="color:#FFF !important;">Interest</span></h4>
    	</div>
        <div class="row">
            <div class="col-xs-12">
                <textarea class="textarea" name="interest" placeholder="Place some text description here" style="width: 100%; height: 215px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;">
                     <?php echo $interestResult; ?>
                </textarea>
                <span class="error"><?php echo form_error("interest"); ?></span>
            </div>
        </div>
    </div>
</div>


<div class="box box-primary">
    
    <div class="box-body">
    		<div class="box-header">
        		<h4 class="box_content"><span style="color:#FFF !important;">References</span></h4>
   		    </div>
        <div class="row">
            <div class="col-xs-12">
                <textarea class="textarea" name="reference" placeholder="Place some text description here" style="width: 100%; height: 215px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;">
                    <?php echo $referenceResult; ?>
                </textarea>
                <span class="error"><?php echo form_error("reference"); ?></span>
            </div>
        </div>
    </div>
</div>

</div>
<div class="box-footer">
    <div class="">
        <button class="btn btn-primary" type="submit">
            <i class="fa fa-fw fa-save"></i> Save
        </button>
    </div>
</div>
</form>
</div><!-- /.box-body -->

</div><!-- /. end facebook fan page -->
		</div><!-- nav-tabs-custom -->
	</div><!-- /.col -->
</div>

